<div class="title">
    <?php if (isset($icon)): ?>
        <img src="<?= base_url('img/icons') . '/' . $icon['file'] ?>" alt="<?= $icon['name'] ?>" />
    <?php endif; ?>
    <?= $title ?>
    <div class="title-menu">
        <img src="<?= base_url('img/add.png') ?>" alt="tambah" />
        <a href="<?= site_url('admin/user/add') ?>">Tambah Admin</a>
    </div>
</div>

<table id="data-table" class="tablesorter">
    <thead>
        <tr>
            <th>Nama</th>
            <th>Email</th>
            <th>Telp/Ponsel</th>
            <th>Pilihan</th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($users as $val): ?>
            <tr>
                <td><?= $val->first_name . ' ' . $val->last_name ?></td>
                <td><?= $val->email ?></td>
                <td><?= $val->contact ?></td>
                <td style="text-align:center;width:80px;">
                    <a class="edit" href="<?= site_url('admin/user/edit/' . $val->id) ?>" title="Edit"><img src="<?= base_url('img/pencil.png') ?>" style="width:16px;height:16px;" /></a>&nbsp;
                    <a class="delete" href="javascript:deleteAction(<?= $val->id ?>)" title="Delete"><img src="<?= base_url('img/cross.png') ?>" style="width:16px;height:16px;" /></a>
                </td>
            </tr>
        <?php endforeach; ?>
    </tbody>
<tfoot>
    <tr>
        <td colspan="4">
<div id="pagers" class="pagers">
    <form>
        <table style="width:100%;border:0;border-collapse:collapse">
            <tr>
                <td>
                    <span style="font-size:22;">Display </span>
                    <select class="pagesize">
                        <option selected="selected" value="5">5</option>
                        <option value="10">10</option>
                        <option value="20">20</option>
                    </select>
                </td>
                <td style="text-align:right;">
                    <div>
                    <img src="<?= base_url('img/pager/first.png') ?>" class="first" />
                    <img src="<?= base_url('img/pager/prev.png') ?>" class="prev" />
                    <input type="text" class="pagedisplay" style="width:30px;" readonly /> 
                    <img src="<?= base_url('img/pager/next.png') ?>" class="next" />
                    <img src="<?= base_url('img/pager/last.png') ?>" class="last" /> 
                    </div>
                </td>
            </tr>
        </table>
    </form>
</div>
</td>
</tr>
</tfoot>
</table>
<form id="formDelete" method="post" action="<?= site_url('admin/user/delete') ?>">
    <input type="hidden" id="id" name="id" value="" />
</form>